package com.hg.strategy.demo1;

/**
 * 具体类
 * created by skh on 2018/3/24
 */
public class Context {
	private IStrategy iStrategy;

	public Context(IStrategy iStrategy) {
		this.iStrategy = iStrategy;
	}

	//具体执行的方法
	public void execute() {
		iStrategy.doSomething();
	}

	public void setiStrategy(IStrategy iStrategy) {
		this.iStrategy = iStrategy;
	}
}
